//
//  CustomBtn.m
//  HxgProject
//
//  Created by hxg on 2018/3/8.
//  Copyright © 2018年 XMYY-19. All rights reserved.
//

#import "CustomBtn.h"

@implementation CustomBtn

-(instancetype)initWithFrame:(CGRect)frame
                        text:(NSString *)text
                     bgColor:(UIColor *)color
                    fontSize:(float)size
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self setTitle:text forState:UIControlStateNormal];
        [self setBackgroundColor:color];
        self.titleLabel.font = [UIFont systemFontOfSize:size];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
